import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [{
        path: '/', redirect: '/index'
    }, {
        path: '/login', meta: {title: '登录页面'}, component: () => import('../../views/login.vue'),
    }, {
        path: '*', redirect: '/404'
    }, {
        path: '/', component: () => import('../../views/base/Home.vue'), meta: {title: '主页框架'}, children: [{
            path: '/index', component: () => import('../../views'), meta: {title: '系统首页'}
        }, {
            path: '/404', component: () => import( '../../views/error/404.vue'), meta: {title: '404'}
        }, {
            path: '/403', component: () => import('../../views/error/403.vue'), meta: {title: '403'}
        }, {
            path: '/User', component: () => import('../../views/master/User.vue'), meta: {title: '用户管理'}
        }, {
            path: '/Role', component: () => import('../../views/master/Role.vue'), meta: {title: '角色管理'}
        }, {
            path: '/Res', component: () => import('../../views/master/Res.vue'), meta: {title: '资源管理'}
        }, {
            path: '/Config', component: () => import('../../views/master/Config'), meta: {title: '基础配置'}
        }, {
            path: '/Job', component: () => import('../../views/master/Job'), meta: {title: '任务列表'}
        }, {
            path: '/profile', component: () => import('../../views/mine/Profile'), meta: {title: '个人中心'}
        },]
    }

    ]
});
